package com.taotao.slink.utils;

import com.taotao.common.redis.RedisKeys;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 集中管理redis的key
 * </p>
 *
 * @author fanbeibei
 * @version V1.0
 * @since 2019/9/8 10:45
 */
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class SlinkRedisKeys extends RedisKeys {
    public static final String COMMMON_PRIFFIX = "slink:";
    public static final String CAPTCHA_PRIFFIX = COMMMON_PRIFFIX + "captcha:";
    public static final String LINK_CODE_PRIFFIX = COMMMON_PRIFFIX + "linkcode:";


    public static String getLoginCaptchaKey(String clientCode) {
        return CAPTCHA_PRIFFIX + "login:" + clientCode;
    }


    public static String getSlinkPriffix(String shortLinkCode) {
        return LINK_CODE_PRIFFIX + shortLinkCode;
    }
}
